package com.gugee.ins.data.collector.mblogger.config;

import com.gugee.ins.data.common.config.KafkaProducerCommon;
import com.gugee.ins.data.common.msg.InsBloggerMessage;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafka;
import org.springframework.kafka.core.KafkaTemplate;


/**
 *
 * @author luolifeng
 * Date  2020/10/27
 */
@Configuration
@EnableKafka
public class KafkaProducerInsBloggerMsgConfig {
    @Bean("insBloggerMsgBaseInfoProducer")
    public KafkaTemplate<Long, InsBloggerMessage> kafkaTemplateInsBloggerMain( KafkaProducerCommon kafkaProducerCommon) {
        return new KafkaTemplate<>(kafkaProducerCommon.myKafkaProducerFactory(InsBloggerMessage.MsgSerializer.class));
    }

}
